<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">

     <link rel="stylesheet" href="__STATIC__/layout/css/channel.css" type="text/css">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">


    <link href="__STATIC__/layout/css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">
  
    <link rel="stylesheet" href="__STATIC__/layout/css/zTreeStyle.css" type="text/css">

    <style>
		   .radio-inline input[type=radio] {
            margin-top: 4px
        }
        .note-editable{height: 200px}
        .ren{
        	padding: 5px;
        	display: inline-block;
        	background: #DEEFFF;
        	border-radius: 5px;
        	margin:0 10px;
        }
        .ren:hover{
        	background: #AAAFFF;
        }
        #hesuan{
        	display: none;
        }
        .red{
            border-color: red;
        }
    </style>
</head>

<body style="color:#333;padding:3px; overflow-x: auto;">
    <!-- 标题 -->
    <div class="page-heade">
      <h1 class="title_color">AP费用申请明细</h1>
    </div>
    <!-- 标题 -->
    <div class="row-margin-top">
    <form id="form1"  method="post"  class="form-inline">
    <input type="hidden" name="detail" id="detailid" value="{$did}" />
       <table class="table-bordered table t_table">
            <tr> 
                <td>供应商<span style="color:red">*</span>:</td>
                <td colspan="3">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-xs-8">
                                <div class="input-group" style="display:none;" >
                                    <input type="text" placeholder="请输入关键字或空格查询" class="form-control gys" name="gys" value="{$detail.gys}">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <div class="selectedOnlyOne "  >
                                    
                                    <span class="inin">{$detail.gys_name}</span>
                                    <span class="close">×</span>
                                </div>
                            </div>
                            <div class="col-xs-4">
                                <!--<button type="button" class="btn btn-primary select_gys" >选择</button>-->
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            {if $areatype==1}
            <tr> 
                <td>分区<span style="color:red">*</span>:</td>
                <td colspan="3">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-xs-8">
                                <div class="input-group" style="display:none;" >
                                    <input type="text" placeholder="请输入关键字或空格查询" id="fenqu" class="form-control fenqu" name="fenqu" value="{$detail.fenqu}">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <div class="selectedOnlyOne "  >
                                    
                                    <span class="inin">{$detail.fenqu_name}</span>
                                    <span class="close">×</span>
                                </div>
                            </div>
                            <div class="col-xs-4">
                                 <!--<button type="button" class="btn btn-primary select_feiyong_id" >选择</button>-->
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            {elseif $areatype==2}
             <tr> 
                <td>省份<span style="color:red">*</span>:</td>
                <td colspan="3">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-xs-8">
                                <div class="input-group" style="display:none;" >
                                    <input type="text" placeholder="请输入关键字或空格查询" id="sheng" class="form-control sheng" name="sheng" value="{$detail.sheng}">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <div class="selectedOnlyOne "  >
                                    
                                    <span class="inin">{$detail.sheng_name}</span>
                                    <span class="close">×</span>
                                </div>
                            </div>
                            <div class="col-xs-4">
                                 <!--<button type="button" class="btn btn-primary select_feiyong_id" >选择</button>-->
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            {elseif $areatype==3}
             <tr> 
                <td>城市<span style="color:red">*</span>:</td>
                <td colspan="3">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-xs-8">
                                <div class="input-group" style="display:none;" >
                                    <input type="text" placeholder="请输入关键字或空格查询" id="shi" class="form-control shi" name="shi" value="{$detail.shi}">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <div class="selectedOnlyOne "  >
                                    
                                    <span class="inin">{$detail.shi_name}</span>
                                    <span class="close">×</span>
                                </div>
                            </div>
                            <div class="col-xs-4">
                                 <!--<button type="button" class="btn btn-primary select_feiyong_id" >选择</button>-->
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            {elseif $areatype==4}
            <tr> 
                <td>经销商<span style="color:red">*</span>:</td>
                <td colspan="3">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-xs-8">
                                <div class="input-group" style="display:none;" >
                                    <input type="text" placeholder="请输入关键字或空格查询" id="jxs" class="form-control jxs" name="jxs" value="{$detail.jxs}">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <div class="selectedOnlyOne "  >
                                    
                                    <span class="inin">{$detail.jxs_name}</span>
                                    <span class="close">×</span>
                                </div>
                            </div>
                            <div class="col-xs-4">
                                 <!--<button type="button" class="btn btn-primary select_feiyong_id" >选择</button>-->
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            {elseif $areatype==5}
             <tr> 
                <td>系统<span style="color:red">*</span>:</td>
                <td colspan="3">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-xs-8">
                                <div class="input-group" style="display:none;" >
                                    <input type="text" placeholder="请输入关键字或空格查询" id="system" class="form-control system" name="system" value="{$detail.system}">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <div class="selectedOnlyOne "  >
                                    
                                    <span class="inin">{$detail.system_name}</span>
                                    <span class="close">×</span>
                                </div>
                            </div>
                            <div class="col-xs-4">
                                 <!--<button type="button" class="btn btn-primary select_feiyong_id" >选择</button>-->
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            {else}
            <tr> 
                <td>网点<span style="color:red">*</span>:</td>
                <td colspan="3">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-xs-8">
                                <div class="input-group" style="display:none;" >
                                    <input type="text" placeholder="请输入关键字或空格查询" id="net" class="form-control net" name="net" value="{$detail.net}">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <div class="selectedOnlyOne "  >
                                    
                                    <span class="inin">{$detail.net_name}</span>
                                    <span class="close">×</span>
                                </div>
                            </div>
                            <div class="col-xs-4">
                                 <!--<button type="button" class="btn btn-primary select_feiyong_id" >选择</button>-->
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            {/if}
            {if $protype==1}
            <tr> 
                <td>品牌<span style="color:red">*</span>:</td>
                <td colspan="3">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-xs-8">
                                <div class="input-group" style="display:none;" >
                                    <input type="text" placeholder="请输入关键字或空格查询" id="brand" class="form-control brand" name="brand" value="{$detail.brand}">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <div class="selectedOnlyOne "  >
                                    
                                    <span class="inin">{$detail.brand_name}</span>
                                    <span class="close">×</span>
                                </div>
                            </div>
                            <div class="col-xs-4">
                                 <!--<button type="button" class="btn btn-primary select_feiyong_id" >选择</button>-->
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            {elseif $protype==2}
            <tr> 
                <td>品类<span style="color:red">*</span>:</td>
                <td colspan="3">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-xs-8">
                                <div class="input-group" style="display:none;" >
                                    <input type="text" placeholder="请输入关键字或空格查询" id="category" class="form-control category" name="category" value="{$detail.category}">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <div class="selectedOnlyOne "  >
                                    
                                    <span class="inin">{$detail.cate_name}</span>
                                    <span class="close">×</span>
                                </div>
                            </div>
                            <div class="col-xs-4">
                                 <!--<button type="button" class="btn btn-primary select_feiyong_id" >选择</button>-->
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            {else}
            <tr> 
                <td>系列<span style="color:red">*</span>:</td>
                <td colspan="3">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-xs-8">
                                <div class="input-group" style="display:none;" >
                                    <input type="text" placeholder="请输入关键字或空格查询" id="series" class="form-control series" name="series" value="{$detail.series}">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <div class="selectedOnlyOne "  >
                                    
                                    <span class="inin">{$detail.series_name}</span>
                                    <span class="close">×</span>
                                </div>
                            </div>
                            <div class="col-xs-4">
                                 <!--<button type="button" class="btn btn-primary select_feiyong_id" >选择</button>-->
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            {/if}
            <tr> 
                <td>三级费用科目<span style="color:red">*</span>:</td>
                <td colspan="3">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-xs-8">
                                <div class="input-group" style="display:none;" >
                                    <input type="text" placeholder="请输入关键字或空格查询" id="feiyong_id" class="form-control feiyong_id" name="feiyong_id" value="{$detail.feiyong_id}">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <div class="selectedOnlyOne "  >
                                    
                                    <span class="inin">{$detail.kemu}</span>
                                    <span class="close">×</span>
                                </div>
                            </div>
                            <div class="col-xs-4">
                                 <!--<button type="button" class="btn btn-primary select_feiyong_id" >选择</button>-->
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td>活动执行时间<span style="color:red">*</span></td>
                <td> <input type="text" id="start" class="form-control layer-date " style="min-width:100px;width:120px;display: inline-block;" name="start_time" value="{$detail.start_time}">至<input type="text" id="end" class="form-control layer-date " style="min-width:100px;width:120px;display: inline-block;" name="end_time" value="{$detail.end_time}"></td>
                <td>预计核销时间<span style="color:red">*</span></td>
                <td>
                    <input type="text" class="form-control layer-date" name="hexiao_time" value="{$detail.hexiao_time}" id="yjverifyTime">
                </td>
            </tr>
            <tr>
                <td>预计销量(元)<span style="color:red">*</span></td>
                <td>
                     <input type="text" class="form-control nums" name="zong_xiaoliang" value="{$detail.zong_xiaoliang}" >
                </td>
                <td>基准销量(元)<span style="color:red">*</span></td>
                <td>
                     <input type="text" class="form-control nums" name="jizhun_xiaoliang" value="{$detail.jizhun_xiaoliang}" >
                </td>
            </tr>
            <tr>
                <td>费用支付方式<span style="color:red">*</span></td>
                <td>
                     <select class="form-control" name="zfid">
                        {volist name="pay" id="p"}
                            {if $p.id==$detail.zfid}
                                <option value="{$p.id}" selected>{$p.title}</option>
                            {else/}
                                <option value="{$p.id}">{$p.title}</option>
                            {/if}
                        {/volist}
                     </select>
                </td>
                <td>未税费用金额(元)<span style="color:red">*</span></td>
                <td>
                     <input type="text" class="form-control nums" name="zonge" value="{$detail.zonge}" >
                </td>
            </tr>
        </tbody>
        <tfoot>
			<tr>
            <td class="text-right">项目描述<span style="color:red">*</span></td>
            <td colspan="3">
                <textarea name="description" id="" rows="2" class="form-control" style="width: 50%">{$detail.description}</textarea><span style="vertical-align: bottom;">(200)</span>
            </td>
        	</tr>
            <tr>
            <td class="text-right">备注<span style="color:red">*</span></td>
            <td colspan="3">
                <textarea name="remark" id="" rows="2" class="form-control" style="width: 50%">{$detail.remark}</textarea><span style="vertical-align: bottom;">(200)</span>
            </td>
            </tr>
        </tfoot>
        
    </table>
       <div class="row sub_btn white-bg" style="width:100%;text-align:center;padding: 20px 0">
       
        <input type="button" id="baocun" class="btn btn-success" onclick="baocunback()" value="保存修改">
       
        <input type="button" class="btn btn-warning" value="返回" id="fanhui">
    </div>
</form>
    </div>
    <!-- 全局js -->
   <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <!-- <script src="js/plugins/layer/layer.min.js"></script> -->

    <!-- 自定义js -->
    <!-- <script src="js/hplus.js?v=4.1.0"></script> -->
    <!-- <script type="text/javascript" src="js/contabs.js"></script> -->
     <!-- Peity -->
    <script src="__STATIC__/layout/js/plugins/peity/jquery.peity.min.js"></script>

    <!-- jqGrid -->
    <script src="__STATIC__/layout/js/plugins/jqgrid/i18n/grid.locale-cn.js?0820"></script>
    <script src="__STATIC__/layout/js/plugins/jqgrid/jquery.jqGrid.min.js?0820"></script>

    <!-- 自定义js -->
    <script src="__STATIC__/layout/js/content.js?v=1.0.0"></script>
     <script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
    
    <!-- ztree -->
    <script type="text/javascript" src="__STATIC__/layout/js/jquery.ztree.core.js"></script>
    <script type="text/javascript" src="__STATIC__/layout/js/jquery.ztree.excheck.js"></script>
    <!-- <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script> -->
    <!--统计代码，可删除-->
    <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script src="__STATIC__/layout/js/plugins/suggest/bootstrap-suggest.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
    <!--统计代码，可删除-->
    <script>
    var aid={$detail.apply_id};
    function baocunback(){
 
   $.ajax({
          cache: true,
          type: "POST",
          url:"{:url('xiugaichuli')}",
          data:$('#form1').serialize(),// 你的formid
          async: false,
          error: function(request) {
            alert("Connection error");
          },
          success: function(data) {
            //alert(data);
            //var res=JSON.parse(data);
                    var res1=JSON.parse(data);
                            if(res1["state"]==1){
                              swal({
                                title: "完成",
                                text: "操作已成功",
                                type: "success"
                                },function(){
                                  parent.location.href="{:url('addform')}?aid="+aid
                                  //parent.layer.close(parent.layer.getFrameIndex(window.name))
                                  //
                                });

                          }else{
                            swal({
                            title: "错误",
                            text:  res1["msg"],
                            type: "warning"
                            });
                          }          
          }
        });
}
      //日期范围限制
        var start = {
            elem: '#start',
            format: 'YYYY-MM-DD',
          
            max: '2099-06-16 23:59:59', //最大日期
            istime: true,
            istoday: false,
            choose: function (datas) {
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日

            }
        };
        var end = {
            elem: '#end',
            format: 'YYYY-MM-DD',
            min: laydate.now(),
            max: '2099-06-16 23:59:59',
            istime: true,
            istoday: false,
            choose: function (datas) {
                start.max = datas; //结束日选好后，重置开始日的最大日期
                yjverifyTime.min=datas;
                  $.post("{:url('TiApply/gettwomon')}",{datet:datas},function(re){
                    //alert(re);
                    $("#yjverifyTime").val(re);
                })  
            }
        };
        var yjverifyTime={
            elem: '#yjverifyTime',
            format: 'YYYY-MM-DD',
            min: laydate.now(), //设定最小日期为当前日期
            max: '2099-06-16 23:59:59', //最大日期
            istime: true,
            istoday: false,

        }
        laydate(yjverifyTime);
        laydate(start);
        laydate(end);
    var channel={$channel};
    $(function(){
         $(".nums").each(function(){
                if(isNaN(parseFloat($(this).val()))){
                    $(this).val(0);
                }else{
                    $(this).val(parseFloat($(this).val()).toFixed(2));
                }
            })
    })
    $(".nums").blur(function(){
        if(isNaN(parseFloat($(this).val()))){
                    $(this).val(0);
                }else{
                    $(this).val(parseFloat($(this).val()).toFixed(2));
                }
    })
    $("#fanhui").click(function(){
        parent.layer.close(parent.layer.getFrameIndex(window.name))
    })
    //取消单选
    $('body').on('click','.selectedOnlyOne .close',function () {
        $(this).closest('.selectedOnlyOne').hide().find('.inin').html('')
        $(this).closest('.selectedOnlyOne').prev('.input-group').show().find('input').val('')
    })
    </script>
    <script type="text/javascript">
           //网点搜索自动补全
    $("#net").bsSuggest({
        url: "{:url('wangdianjson')}",
        /*effectiveFields: ["userName", "shortAccount"],
         searchFields: [ "shortAccount"],*/
        effectiveFieldsAlias:{title: "名称"},
        ignorecase: true,
        showHeader: true,
        showBtn: false,     //不显示下拉按钮
        delayUntilKeyup: true, //获取数据的方式为 firstByUrl 时，延迟到有输入/获取到焦点时才请求数据
        idField: "id",
        keyField: "title",
        clearable: true
    }).on('onSetSelectValue', function (e, keyword, data) {
         $(this).closest('.input-group').hide().next('.selectedOnlyOne').show().find('.inin').html(keyword.key)
        $(this).val(keyword.id)
    });
   
     //系统搜索自动补全
    $("#system").bsSuggest({
        url: "{:url('xtjson')}",
        /*effectiveFields: ["userName", "shortAccount"],
         searchFields: [ "shortAccount"],*/
        effectiveFieldsAlias:{title: "名称"},
        ignorecase: true,
        showHeader: true,
        showBtn: false,     //不显示下拉按钮
        delayUntilKeyup: true, //获取数据的方式为 firstByUrl 时，延迟到有输入/获取到焦点时才请求数据
        idField: "id",
        keyField: "title",
        clearable: true
    }).on('onSetSelectValue', function (e, keyword, data) {
         $(this).closest('.input-group').hide().next('.selectedOnlyOne').show().find('.inin').html(keyword.key)
        $(this).val(keyword.id)
    });
    
                //经销商搜索自动补全
    $("#jxs").bsSuggest({
        url: "{:url('jxsjson')}",
        /*effectiveFields: ["userName", "shortAccount"],
         searchFields: [ "shortAccount"],*/
        effectiveFieldsAlias:{title: "名称"},
        ignorecase: true,
        showHeader: true,
        showBtn: false,     //不显示下拉按钮
        delayUntilKeyup: true, //获取数据的方式为 firstByUrl 时，延迟到有输入/获取到焦点时才请求数据
        idField: "id",
        keyField: "title",
        clearable: true
    }).on('onSetSelectValue', function (e, keyword, data) {
         $(this).closest('.input-group').hide().next('.selectedOnlyOne').show().find('.inin').html(keyword.key)
        $(this).val(keyword.id)
    });
    
              //市搜索自动补全
    $("#shi").bsSuggest({
        url: "{:url('shijson')}",
        /*effectiveFields: ["userName", "shortAccount"],
         searchFields: [ "shortAccount"],*/
        effectiveFieldsAlias:{title: "名称"},
        ignorecase: true,
        showHeader: true,
        showBtn: false,     //不显示下拉按钮
        delayUntilKeyup: true, //获取数据的方式为 firstByUrl 时，延迟到有输入/获取到焦点时才请求数据
        idField: "id",
        keyField: "title",
        clearable: true
    }).on('onSetSelectValue', function (e, keyword, data) {
         $(this).closest('.input-group').hide().next('.selectedOnlyOne').show().find('.inin').html(keyword.key)
        $(this).val(keyword.id)
    });
   
            //省份搜索自动补全
    $("#sheng").bsSuggest({
        url: "{:url('shengjson')}",
        /*effectiveFields: ["userName", "shortAccount"],
         searchFields: [ "shortAccount"],*/
        effectiveFieldsAlias:{title: "名称"},
        ignorecase: true,
        showHeader: true,
        showBtn: false,     //不显示下拉按钮
        delayUntilKeyup: true, //获取数据的方式为 firstByUrl 时，延迟到有输入/获取到焦点时才请求数据
        idField: "id",
        keyField: "title",
        clearable: true
    }).on('onSetSelectValue', function (e, keyword, data) {
         $(this).closest('.input-group').hide().next('.selectedOnlyOne').show().find('.inin').html(keyword.key)
        $(this).val(keyword.id)
    });
     

           //分区搜索自动补全
    $("#fenqu").bsSuggest({
        url: "{:url('fenqujson')}",
        /*effectiveFields: ["userName", "shortAccount"],
         searchFields: [ "shortAccount"],*/
        effectiveFieldsAlias:{title: "名称"},
        ignorecase: true,
        showHeader: true,
        showBtn: false,     //不显示下拉按钮
        delayUntilKeyup: true, //获取数据的方式为 firstByUrl 时，延迟到有输入/获取到焦点时才请求数据
        idField: "id",
        keyField: "title",
        clearable: true
    }).on('onSetSelectValue', function (e, keyword, data) {
         $(this).closest('.input-group').hide().next('.selectedOnlyOne').show().find('.inin').html(keyword.key)
        $(this).val(keyword.id)
    });

    $("#feiyong_id").bsSuggest({
        url: "{:url('feiyong3json')}?esuseway=6&channel="+channel,
        /*effectiveFields: ["userName", "shortAccount"],
         searchFields: [ "shortAccount"],*/
        effectiveFieldsAlias:{title: "名称"},
        ignorecase: true,
        showHeader: true,
        showBtn: false,     //不显示下拉按钮
        delayUntilKeyup: true, //获取数据的方式为 firstByUrl 时，延迟到有输入/获取到焦点时才请求数据
        idField: "id",
        keyField: "title",
        clearable: true
    }).on('onSetSelectValue', function (e, keyword, data) {
        $(this).closest('.input-group').hide().next('.selectedOnlyOne').show().find('.inin').html(keyword.key)
        $(this).val(keyword.id)
        
    });
         //供应商搜索自动补全
    $(".gys").bsSuggest({
        url: "{:url('gysjson')}",
        /*effectiveFields: ["userName", "shortAccount"],
         searchFields: [ "shortAccount"],*/
        effectiveFieldsAlias:{title: "名称"},
        ignorecase: true,
        showHeader: true,
        showBtn: false,     //不显示下拉按钮
        delayUntilKeyup: true, //获取数据的方式为 firstByUrl 时，延迟到有输入/获取到焦点时才请求数据
        idField: "id",
        keyField: "title",
        clearable: true
    }).on('onSetSelectValue', function (e, keyword, data) {
        $(this).closest('.input-group').hide().next('.selectedOnlyOne').show().find('.inin').html(keyword.key)
        $(this).val(keyword.id)

    });
       //产品品牌搜索自动补全
    $("#brand").bsSuggest({
        url: "{:url('select/brandjson')}",
        /*effectiveFields: ["userName", "shortAccount"],
         searchFields: [ "shortAccount"],*/
        effectiveFieldsAlias:{title: "名称"},
        ignorecase: true,
        showHeader: true,
        showBtn: false,     //不显示下拉按钮
        delayUntilKeyup: true, //获取数据的方式为 firstByUrl 时，延迟到有输入/获取到焦点时才请求数据
        idField: "id",
        keyField: "title",
        clearable: true
    }).on('onSetSelectValue', function (e, keyword, data) {
         $(this).closest('.input-group').hide().next('.selectedOnlyOne').show().find('.inin').html(keyword.key)
        $(this).val(keyword.id)
    });
       //产品品类搜索自动补全
    $("#category").bsSuggest({
        url: "{:url('select/categoryjson')}",
        /*effectiveFields: ["userName", "shortAccount"],
         searchFields: [ "shortAccount"],*/
        effectiveFieldsAlias:{title: "名称"},
        ignorecase: true,
        showHeader: true,
        showBtn: false,     //不显示下拉按钮
        delayUntilKeyup: true, //获取数据的方式为 firstByUrl 时，延迟到有输入/获取到焦点时才请求数据
        idField: "id",
        keyField: "title",
        clearable: true
    }).on('onSetSelectValue', function (e, keyword, data) {
        $(this).closest('.input-group').hide().next('.selectedOnlyOne').show().find('.inin').html(keyword.key)
        $(this).val(keyword.id)
    });
    //产品系列搜索自动补全
    $("#series").bsSuggest({
        url: "{:url('select/seriesjson')}",
        /*effectiveFields: ["userName", "shortAccount"],
         searchFields: [ "shortAccount"],*/
        effectiveFieldsAlias:{title: "名称"},
        ignorecase: true,
        showHeader: true,
        showBtn: false,     //不显示下拉按钮
        delayUntilKeyup: true, //获取数据的方式为 firstByUrl 时，延迟到有输入/获取到焦点时才请求数据
        idField: "id",
        keyField: "title",
        clearable: true
    }).on('onSetSelectValue', function (e, keyword, data) {
        $(this).closest('.input-group').hide().next('.selectedOnlyOne').show().find('.inin').html(keyword.key)
        $(this).val(keyword.id)
    });
      //弹出选择我的供应商树
      /*  $('body').on('click','.select_gys',function () {
            var _this = this
                layer.open({
                    type:2,
                    area:['60%','60%'],
                    title:'费用计入部门树',
                    maxmin:true,
                    content:'{:url("selectGys")}',
                    btn:'确定',
                    btnAlign:'c',
                    yes:function (i,o) {

                        var id = $(o).find('iframe').contents().find('#renyuan').val()
                        var name = $(o).find('iframe').contents().find('#renyuanname').val()
                        if(id){
                            $(_this).closest('div').prev('div').find('.input-group').hide().find('.feetype').val(id)
                            $(_this).closest('div').prev('div').find('.selectedOnlyOne').show().find('.inin').html(name)
                        }
                        layer.close(i)
                    }
                })
                return  false
        })*/

    </script>
</body>

</html>
